package src;

import src.server.AbstractServer;
import src.server.LoginServer;
import src.server.MatchThread;
import src.server.ScoreServer;

import java.security.KeyException;

import static java.lang.Thread.sleep;


/**
 * @author CsCN
 */
public class Main {
    public static boolean running = false;

    public static void main(String[] args) {
        try {
            running = true;
            AbstractServer loginServer = new LoginServer();
            Thread loginThread = new Thread(loginServer::start);
            loginThread.start();
            new Thread(ScoreServer.getInstance()::start).start();
            sleep(1000);
            System.out.println("start client");
            Client client = new Client();
            new Thread(client::test1).start();
//            new Thread(client::test).start();
        } catch (InterruptedException e) {
            e.printStackTrace();
            running = false;
        }
    }
}
